
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GLES1.1] Gl.Get: params returns one value, the matrix index array buffer binding. See Gl.MatrixIndexPointer.
		/// </summary>
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public const int MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES = 0x8B9E;

		/// <summary>
		/// [GLES1.1] glCurrentPaletteMatrixOES: defines which of the palette's matrices is affected by subsequent matrix operations
		/// </summary>
		/// <param name="matrixpaletteindex">
		/// A <see cref="T:uint"/>.
		/// </param>
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public static void CurrentPaletteMatrixOES(uint matrixpaletteindex)
		{
			Debug.Assert(Delegates.pglCurrentPaletteMatrixOES != null, "pglCurrentPaletteMatrixOES not implemented");
			Delegates.pglCurrentPaletteMatrixOES(matrixpaletteindex);
			LogCommand("glCurrentPaletteMatrixOES", null, matrixpaletteindex			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glLoadPaletteFromModelViewMatrixOES: copies the current model view matrix to a matrix in the current matrix 
		/// palette
		/// </summary>
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public static void LoadPaletteFromModelViewMatrixOES()
		{
			Debug.Assert(Delegates.pglLoadPaletteFromModelViewMatrixOES != null, "pglLoadPaletteFromModelViewMatrixOES not implemented");
			Delegates.pglLoadPaletteFromModelViewMatrixOES();
			LogCommand("glLoadPaletteFromModelViewMatrixOES", null			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glMatrixIndexPointerOES: define an array of matrix indices
		/// </summary>
		/// <param name="size">
		/// Specifies the number of matrix indices per vertex. Must be is less than or equal to Gl.MAX_VERTEX_UNITS_OES. The initial 
		/// value is Gl..
		/// </param>
		/// <param name="type">
		/// Specifies the data type of each matrix index in the array. Symbolic constant Gl.UNSIGNED_BYTE is accepted. The initial 
		/// value is Gl.UNSIGNED_BYTE.
		/// </param>
		/// <param name="stride">
		/// Specifies the byte offset between consecutive matrix indices. If <paramref name="stride"/> is 0, the matrix indices are 
		/// understood to be tightly packed in the array. The initial value is Gl..
		/// </param>
		/// <param name="pointer">
		/// Specifies a pointer to the first matrix index of the first vertex in the array. The initial value is Gl..
		/// </param>
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public static void MatrixIndexPointerOES(int size, int type, int stride, IntPtr pointer)
		{
			Debug.Assert(Delegates.pglMatrixIndexPointerOES != null, "pglMatrixIndexPointerOES not implemented");
			Delegates.pglMatrixIndexPointerOES(size, type, stride, pointer);
			LogCommand("glMatrixIndexPointerOES", null, size, type, stride, pointer			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glMatrixIndexPointerOES: define an array of matrix indices
		/// </summary>
		/// <param name="size">
		/// Specifies the number of matrix indices per vertex. Must be is less than or equal to Gl.MAX_VERTEX_UNITS_OES. The initial 
		/// value is Gl..
		/// </param>
		/// <param name="type">
		/// Specifies the data type of each matrix index in the array. Symbolic constant Gl.UNSIGNED_BYTE is accepted. The initial 
		/// value is Gl.UNSIGNED_BYTE.
		/// </param>
		/// <param name="stride">
		/// Specifies the byte offset between consecutive matrix indices. If <paramref name="stride"/> is 0, the matrix indices are 
		/// understood to be tightly packed in the array. The initial value is Gl..
		/// </param>
		/// <param name="pointer">
		/// Specifies a pointer to the first matrix index of the first vertex in the array. The initial value is Gl..
		/// </param>
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public static void MatrixIndexPointerOES(int size, int type, int stride, object pointer)
		{
			GCHandle pin_pointer = GCHandle.Alloc(pointer, GCHandleType.Pinned);
			try {
				MatrixIndexPointerOES(size, type, stride, pin_pointer.AddrOfPinnedObject());
			} finally {
				pin_pointer.Free();
			}
		}

		/// <summary>
		/// [GLES1.1] glWeightPointerOES: define an array of weights
		/// </summary>
		/// <param name="size">
		/// Specifies the number of weights per vertex. Must be is less than or equal to Gl.MAX_VERTEX_UNITS_OES. The initial value 
		/// is Gl..
		/// </param>
		/// <param name="type">
		/// Specifies the data type of each weight in the array. Symbolic constant Gl.FIXED is accepted. However, the common profile 
		/// also accepts the symbolic constant Gl.FLOAT as well. The initial value is Gl.FIXED for the common lite profile, or 
		/// Gl.FLOAT for the common profile.
		/// </param>
		/// <param name="stride">
		/// Specifies the byte offset between consecutive weights. If <paramref name="stride"/> is 0, the weights are understood to 
		/// be tightly packed in the array. The initial value is Gl..
		/// </param>
		/// <param name="pointer">
		/// Specifies a pointer to the first weight of the first vertex in the array. The initial value is Gl..
		/// </param>
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public static void WeightPointerOES(int size, int type, int stride, IntPtr pointer)
		{
			Debug.Assert(Delegates.pglWeightPointerOES != null, "pglWeightPointerOES not implemented");
			Delegates.pglWeightPointerOES(size, type, stride, pointer);
			LogCommand("glWeightPointerOES", null, size, type, stride, pointer			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GLES1.1] glWeightPointerOES: define an array of weights
		/// </summary>
		/// <param name="size">
		/// Specifies the number of weights per vertex. Must be is less than or equal to Gl.MAX_VERTEX_UNITS_OES. The initial value 
		/// is Gl..
		/// </param>
		/// <param name="type">
		/// Specifies the data type of each weight in the array. Symbolic constant Gl.FIXED is accepted. However, the common profile 
		/// also accepts the symbolic constant Gl.FLOAT as well. The initial value is Gl.FIXED for the common lite profile, or 
		/// Gl.FLOAT for the common profile.
		/// </param>
		/// <param name="stride">
		/// Specifies the byte offset between consecutive weights. If <paramref name="stride"/> is 0, the weights are understood to 
		/// be tightly packed in the array. The initial value is Gl..
		/// </param>
		/// <param name="pointer">
		/// Specifies a pointer to the first weight of the first vertex in the array. The initial value is Gl..
		/// </param>
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public static void WeightPointerOES(int size, int type, int stride, object pointer)
		{
			GCHandle pin_pointer = GCHandle.Alloc(pointer, GCHandleType.Pinned);
			try {
				WeightPointerOES(size, type, stride, pin_pointer.AddrOfPinnedObject());
			} finally {
				pin_pointer.Free();
			}
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glCurrentPaletteMatrixOES(uint matrixpaletteindex);

			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[ThreadStatic]
			internal static glCurrentPaletteMatrixOES pglCurrentPaletteMatrixOES;

			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glLoadPaletteFromModelViewMatrixOES();

			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[ThreadStatic]
			internal static glLoadPaletteFromModelViewMatrixOES pglLoadPaletteFromModelViewMatrixOES;

			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glMatrixIndexPointerOES(int size, int type, int stride, IntPtr pointer);

			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[ThreadStatic]
			internal static glMatrixIndexPointerOES pglMatrixIndexPointerOES;

			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightPointerOES(int size, int type, int stride, IntPtr pointer);

			[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
			[ThreadStatic]
			internal static glWeightPointerOES pglWeightPointerOES;

		}
	}

}
